<?php

/* 属性 attribute */
class AttributeModel extends BaseModel
{
    var $table  = 'attribute';
    var $prikey = 'attr_id';
    var $_name  = 'attribute';
    
    /* 添加编辑时自动验证 */
    var $_autov = array(
        'attr_name' => array(
            'required'  => true,    //必填
            'min'       => 1,       //最短1个字符
            'max'       => 100,     //最长100个字符
            'filter'    => 'trim',
        ),
        'sort_order'  => array(
            'filter'    => 'intval',
        ),
        /*
        'def_value' => array(
            'required'  => true,    //必填
            'min'       => 1,       //最短1个字符
            'max'       => 300,     //最长300个字符
            'filter'    => 'trim',
        ),*/
    );
}